// import { Status } from '../types/status.d';

import { MenuType } from './menus';
import { RoleSystem } from './roles';

export const enum Status {
  disable,
  enable,
}

export interface Dict {
  key: string;
  parent: string;
  title: string;
  value?: any;
  status: Status;
  createTime: Date;
  sort: number;
  updateTime?: Date;
}

const createTime = new Date();
const updateTime = createTime;

export default <Dict[]>[
  {
    key: 'system.status',
    parent: '',
    title: '状态',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 1,
  },

  {
    key: 'system.status.enable',
    parent: 'system.status',
    title: '启用',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 1,
    value: Status.enable,
  },
  {
    key: 'system.status.disable',
    parent: 'system.status',
    title: '禁用',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 2,
    value: Status.disable,
  },
  {
    key: 'system.menuType',
    parent: '',
    title: '菜单类型',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 1,
  },
  {
    key: 'system.menuType.subMenu',
    parent: 'system.menuType',
    title: '目录',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 1,
    value: MenuType.subMenu,
  },
  {
    key: 'system.menuType.group',
    parent: 'system.menuType',
    title: '分组',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 2,
    value: MenuType.group,
  },
  {
    key: 'system.menuType.page',
    parent: 'system.menuType',
    title: '页面',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 3,
    value: MenuType.page,
  },
  {
    key: 'system.RoleSystem',
    parent: '',
    title: '系统角色',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 1,
  },
  {
    key: 'system.RoleSystem.yes',
    parent: 'system.RoleSystem',
    title: '系统角色',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 2,
    value: RoleSystem.yes,
  },
  {
    key: 'system.RoleSystem.no',
    parent: 'system.RoleSystem',
    title: '非系统角色',
    status: Status.enable,
    createTime,
    updateTime,
    sort: 3,
    value: RoleSystem.no,
  },
];
